﻿using System;
using System.Globalization;
using System.Windows.Data;
using DemoRealtimeData.Service;

namespace DemoRealtimeData.ViewModel
{
    public sealed class DataType2DescriptionConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            DataType dttype = (DataType) value;
            return Common.DataType2Description[dttype];
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
